package com.square.service.gateway.config;

import com.square.service.gateway.filter.LoginAuthCheckGateWayFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 配置过滤器工厂
 *
 * @author : 王苏
 * @since : 2021/4/24 12:04
 */
@Component
public class LoginAuthCheckGatewayFilterFactory extends AbstractGatewayFilterFactory<Object> {

    @Resource
    private LoginAuthCheckGateWayFilter loginAuthCheckGateWayFilter;

    @Override
    public GatewayFilter apply(Object config) {
        return loginAuthCheckGateWayFilter;
    }
}
